/*    */ package com.jcrj.util;
/*    */ 
/*    */ import java.sql.Connection;
/*    */ import java.sql.PreparedStatement;
/*    */ 
/*    */ public class DiscuzUtil
/*    */ {
/*    */   public void addUser(String account)
/*    */   {
/* 20 */     Connection conn = null;
/* 21 */     PreparedStatement st = null;
/*    */     try {
/* 23 */       conn = DBConnection.getConnection();
/* 24 */       String sql = "insert into pre_ucenter_members(username,password,salt) values(?,'df7fcb3a396205ab73590c25ab97cf51',?)";
/* 25 */       st = conn.prepareStatement(sql);
/* 26 */       st.setString(1, account);
/* 27 */       st.setString(2, "bbdc2e");
/* 28 */       st.executeUpdate();
/*    */     } catch (Exception e) {
/* 30 */       e.printStackTrace();
/*    */     } finally {
/* 32 */       DBConnection.closed(null, st, conn);
/*    */     }
/*    */   }
/*    */ 
/*    */   public void deleteDizUser(String account)
/*    */   {
/* 38 */     Connection conn = null;
/* 39 */     PreparedStatement st = null;
/*    */     try {
/* 41 */       conn = DBConnection.getConnection();
/* 42 */       String sql = "delete from pre_ucenter_members where username=?";
/* 43 */       st = conn.prepareStatement(sql);
/* 44 */       st.setString(1, account);
/* 45 */       st.executeUpdate();
/*    */     } catch (Exception e) {
/* 47 */       e.printStackTrace();
/*    */     } finally {
/* 49 */       DBConnection.closed(null, st, conn);
/*    */     }
/*    */   }
/*    */ 
/*    */   public void updateDizUser(String account, String password) {
/* 54 */     Connection conn = null;
/* 55 */     PreparedStatement st = null;
/*    */     try {
/* 57 */       conn = DBConnection.getConnection();
/* 58 */       String sql = "update pre_ucenter_members set  password=?,salt=? where username=?";
/* 59 */       st = conn.prepareStatement(sql);
/* 60 */       st.setString(1, MD5.toMD5(password + "bbdc2e"));
/* 61 */       st.setString(2, "bbdc2e");
/* 62 */       st.setString(3, account);
/* 63 */       st.executeUpdate();
/*    */     } catch (Exception e) {
/* 65 */       e.printStackTrace();
/*    */     } finally {
/* 67 */       DBConnection.closed(null, st, conn);
/*    */     }
/*    */   }
/*    */ }

/* Location:           /Volumes/work/oa/WEB-INF/classes/
 * Qualified Name:     com.jcrj.util.DiscuzUtil
 * JD-Core Version:    0.6.0
 */